package com.example.pcl.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 公告表，系统公告或重要信息发布
 * </p>
 *
 * @author xx
 * @since 2024-12-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("announcements")
@Schema(name="Announcements对象", description="公告表，系统公告或重要信息发布")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Announcements implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "公告ID")
    @TableId(value = "announcement_id", type = IdType.AUTO)
    private Integer announcementId;

    @Schema(description = "公告标题")
    private String title;

    @Schema(description = "公告内容")
    private String content;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @Schema(description = "是否展示公告标志", example = "1")
    private Integer displayFlag; // 0 表示不展示，1 表示展示

}
